Class Demo.Dict.VectorGen Extends %RegisteredObject
{

/// Description
ClassMethod go() [ Language = python ]
{
  
    import os
    from openai import OpenAI
    import csv
    from langchain_iris import IRISVector
    os.environ["DASHSCOPE_API_KEY"] = "sk-ec120a9dc6ef438797c430fad512ba71"                                                                         
    try:
        client = OpenAI(
        api_key=os.getenv("DASHSCOPE_API_KEY"),  
        base_url="https://dashscope.aliyuncs.com/compatible-mode/v1") 
        completion = client.embeddings.create(
            model="text-embedding-v3",
            input=['风急天高猿啸哀', '渚清沙白鸟飞回', '无边落木萧萧下', '不尽长江滚滚来'],
            encoding_format="float"
        )
        print(completion.model_dump_json())
    except Exception as e:
        print(f"错误信息：{e}")
}

/// test
ClassMethod test() [ Language = python ]
{
    print(f"aaaaa")
}

}
